package com.brainshare.an.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.brainshare.common.annotation.Excel;
import com.brainshare.common.core.domain.BaseEntity;

import javax.validation.constraints.NotNull;

/**
 * 用户数据对象 an_wechat_user
 *
 * @author ruoyi
 * @date 2022-11-04
 */
@Data
public class AnWechatUser extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long wechatUserId;

    /**
     * 昵称
     */
    @Excel(name = "昵称")
    private String nickName;

    /**
     * 姓名
     */
    @Excel(name = "姓名")
    @NotNull(message = "请输入姓名!")
    private String userName;

    /**
     * 用户头像
     */
    private String userIcon;

    /**
     * 性别
     */
    @Excel(name = "性别", readConverterExp = "0=男,1=女,2=未知")
    @NotNull(message = "请输入姓名!")
    private Long sex;

    /**
     * 身份证号
     */
    @Excel(name = "身份证号")
    @NotNull(message = "请输入身份证号!")
    private String userCardId;

    /**
     * 年龄
     */
    @Excel(name = "年龄")
    @NotNull(message = "请输入年龄!")
    private Long age;

    /**
     * 学历
     */
    @Excel(name = "学历")
    @NotNull(message = "请输入学历!")
    private String education;

    /**
     * 联系方式
     */
    @Excel(name = "联系方式")
    @NotNull(message = "请输入联系方式!")
    private String phone;

    /**
     * 是否完成筛查
     */
    @Excel(name = "是否完成筛查")
    private Long isDone;

    /** 清理标识 */
    @Excel(name = "清理标识")
    private Integer clearFlag;

    /**
     * 最近一次筛查分数
     */
    @Excel(name = "最近一次筛查分数")
    private Long screeningScore;

    /**
     * 筛查来源
     */
    @Excel(name = "筛查来源")
    private String screeningSource;

    /**
     * 机构认证操作
     */
    @Excel(name = "机构认证操作")
    private Long isMechanism;

    @Excel(name = "婚姻状况")
//    @NotNull(message = "请输入婚姻状况!")
    private Long marriage;

    @Excel(name = "职业")
//    @NotNull(message = "请输入职业!")
    private String occupation;
    /**
     * 首次授权时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "首次授权时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date authTime;
    /**
     * 所在区域
     */
    @Excel(name = "所在区域")
//    @NotNull(message = "请选择所在区域!")
    private String address;

    private String addressCode;

    private String openId;

    private String promotionCode;

    private Long mechanismId;

    private Long mechanismMemberId;

    private String ipAddress;
    private Long isSuggest;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("wechatUserId", getWechatUserId())
                .append("nickName", getNickName())
                .append("userName", getUserName())
                .append("userIcon", getUserIcon())
                .append("sex", getSex())
                .append("userCardId", getUserCardId())
                .append("age", getAge())
                .append("education", getEducation())
                .append("phone", getPhone())
                .append("isDone", getIsDone())
                .append("screeningScore", getScreeningScore())
                .append("screeningSource", getScreeningSource())
                .append("isMechanism", getIsMechanism())
                .append("authTime", getAuthTime())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
